cmake_minimum_required(VERSION 3.25)

project(feh++)

add_executable(feh++ src/feh++.cc)

target_include_directories(feh++
  PRIVATE
  include
)

find_package(PkgConfig)
pkg_search_module(IMLIB2 REQUIRED imlib2)

message(STATUS "imlib2 include dir: " ${IMLIB2_INCLUDE_DIRS})
message(STATUS "imlib2 lib dir: " ${IMLIB2_LIBRARY_DIRS})
message(STATUS "imlib2 libs: " ${IMLIB2_LIBRARIES})

target_include_directories(feh++
  PRIVATE
  ${IMLIB2_INCLUDE_DIRS}
)
target_link_directories(feh++
  PRIVATE
  ${IMLIB2_LIBRARY_DIRS}
)
target_link_libraries(feh++
  ${IMLIB2_LIBRARIES}
)

pkg_search_module(XINERAMA REQUIRED xinerama)

message(STATUS "xinerama include dir: " ${XINERAMA_INCLUDE_DIRS})
message(STATUS "xinerama lib dir: " ${XINERAMA_LIBRARY_DIRS})
message(STATUS "xinerama libs: " ${XINERAMA_LIBRARIES})

target_include_directories(feh++
  PRIVATE
  ${XINERAMA_INCLUDE_DIRS}
)
target_link_directories(feh++
  PRIVATE
  ${XINERAMA_LIBRARY_DIRS}
)
target_link_libraries(feh++
  ${XINERAMA_LIBRARIES}
)